Release 10.1A: OpenEdge Development:
Programming Interfaces
Creating dynamic 4GL objects from XML Schema
Both the
READ-XML()andREAD-XMLSCHEMA()methods can take an XML Schema and create a temp-table or ProDataSet definition from it.The
READ-XML()method can find and use XML Schema from the following sources, in the order defined below:
- The XML Schema specified with the
schema-locationoption of theREAD-XML()method. If this option is used, XML Schema references embedded in XML data are ignored.- A
<schema>child element of the root element of the XML data document. Provided the method does not specify aschema-location, then any one or combination of this and the remaining list item are used.- An
xsi:schemaLocationorxsi:noNamespaceSchemaLocationattribute on an instance data in the XML data document.In the following example, the
READ-XMLSCHEMA()method will produce a temp-table namedPersonwith fieldsname,height,weight, andgender.
In the next example, the
READ-XMLSCHEMA()method produces a ProDataSet nameddsGardenwith two temp-tables: one for holding information about the plots in the garden and another for holding information about vegetables in the garden.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |